www.gusucode.com > 乘风广告联盟系统(Access版) v4.9 > 乘风广告联盟系统(Access版) v4.9\code\Action\AdminUser\emailserverset.asp

    <%
'乘风广告联盟系统 Access版
'作者QQ:178575
'作者EMail:yliangcf@163.com
'作者网站:http://www.qqcf.com
'详细简介:http://www.qqcf.com/cfwztg.htm
'上面有程序在线演示,安装演示,使用疑难解答,最新版本下载等内容
'因为这些内容可能时常更新,就没有放在程序里,请自己上网站查看
%>
<SCRIPT>
function ashow_1(){
a_1.style.display = "none";
a_2.style.display = "none";
a_3.style.display = "none";
a_4.style.display = "none";
}
function ashow_2(){
a_1.style.display = "";
a_2.style.display = "";
a_3.style.display = "";
a_4.style.display = "";
}
</SCRIPT>
<%
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql="Select * From CFWztg_Admin"
Rs.open Sql,Conn,1,1

If Rs("emailsendtype")=1 Then
 show="ashow_1();"
ElseIf Rs("emailsendtype")=2 Then
 show="ashow_2();"
End If
%>
<table class="tb_1">
  
  <form name="form2" method="post" action="AdminUser.aspx?action=emailserversetsave">
   <tr class="tr_1"> 
      <td colspan="2">邮件发送组件设置</td>
    </tr>
    <tr> 
      <td width="20%">发送邮件组件:</td>
      <td><input type="radio" name="emailsendtype" value="1"<%if rs("emailsendtype")=1 then%> checked<%end if%> onclick="ashow_1()">
        CDONTS组件<%
on error resume next
set TestObj=server.CreateObject ("CDONTS.NewMail")
If -2147221005 <> Err then
 Response.write "(支持)"
Else
  Response.write "(不支持)"
End If
%> 
        <input type="radio" name="emailsendtype" value="2"<%if rs("emailsendtype")=2 then%> checked<%end if%> onclick="ashow_2()">
        JMAIL组件<%
on error resume next
set TestObj=server.CreateObject ("JMail.SmtpMail")
If -2147221005 <> Err then
 Response.write "(支持)"
Else
  Response.write "(不支持,建议安装Jmail组件发送邮件)"
End If
%></td>
    </tr>
    <tr id="a_1"> 
      <td>发送邮件的服务器地址:</td>
      <td><input name="JmailAddress" type="text" value="<%=rs("JmailAddress")%>"></td>
    </tr>
    <tr id="a_2"> 
      <td>发送邮件的Email地址:</td>
      <td><input name="JmailUser" type="text" value="<%=rs("JmailUser")%>"></td>
    </tr>
    <tr id="a_3"> 
      <td>发送邮件的Email密码:</td>
      <td><input name="JmailPassword" type="password" value="<%=rs("JmailPassword")%>"></td>
    </tr>
    <tr id="a_4"> 
      <td></td>
      <td>如:你有一个邮件b@a.com,密码为c,发信服务器地址设置设置为:smtp.a.com<br>发送邮件帐号名称设置为b@a.com,发送邮件帐号的密码设置为c,其它邮件类似</td>
    </tr>
    <tr> 
      <td></td>
	  <td>  
          <input type="submit" name="Submit32" value="修改">
             
          <input type="reset" name="Submit5232" value="取消">
        </td>
    </tr>
  </form>
  
   <form name="form2" method="post" action="AdminUser.aspx?Action=emailtest"> 
  <tr> 
      <td colspan="2">上面设置好的话可以在下面输入你的接受邮件地址测试是否能接收到邮件</td>
    </tr>
    <tr>
      <td colspan="2">你的邮件:
        <input type="text" name="Email">
        <input type="submit" name="submit2" value="测试"></td>
    </tr>
  </form>
  
  </table>